const $http = window.$http
export function getPage(params) {
  return $http.request({
    url: '/warnings/warning/getByPage',
    method: 'get',
    params
  })
}
export function getDetail(params) {
  return $http.request({
    url: '/warnings/warning/getById',
    method: 'get',
    params
  })
}
// 确警误警
export function changeStatus(params) {
  return $http.request({
    url: '/warnings/warning/updateStatus',
    method: 'post',
    params: params
  })
}
// 去处理
export function handleWarnings(params) {
  return $http.request({
    url: '/warnings/warningHandleProcess/handleWarnings',
    method: 'post',
    data: params
  })
}
//过程列表
export function getPageByWarningId(params) {
  return $http.request({
    url: '/warnings/warningHandleProcess/getPageByWarningId',
    method: 'get',
    params
  })
}
// 告警统计头部数量
export function getWarnSummary(data) {
  return $http.request({
    url: '/warnings/warning/getWarningSummary',
    method: 'post',
    data
  })
}
// 船舶告警统计左侧
export function getShipWarnSummay(data) {
  return $http.request({
    url: '/warnings/warning/getShipWarningSummary',
    method: 'post',
    data
  })
}
// 船舶告警统计详情
export function getShipWarnDetail(data) {
  return $http.request({
    url: '/warnings/warning/getWarningShipDetail',
    method: 'post',
    data
  })
}
// 船企名称
export function getCompanyName(params) {
  return $http.request({
    url: '/warnings/warning/getAllTenantName',
    params
  })
}
// 告警模型
export function getWarnModuleList() {
  return $http.request({
    url: '/platform/warning/model/getByList'
  })
}

// 视频点位下拉
export function getVideoPoints(params) {
  return $http.request({
    url: '/ucenter/dict/getCatchType/installation_point',
  })
}
// 船企下拉
export function getTenantList(params) {
  return $http.request({
    url: '/supervise/tenant/getTenantBySupervise',
    params
  })
}
// 船舶下拉
export function getShipList(params) {
  return $http.request({
    url: '/supervise/tenant/getTenantByTenantId',
    params
  })
}
export const getWarnTimes = (params) => {
  return $http.request({
    url: `/warnings/warning/getTimeTypeByTenantId`,
    method: 'get',
  });
}

// 告警处理分析
export function warnProcessAnalysis (params) {
  return $http.request({
    url: '/warnings/warning/warnProcessAnalysis',
    params
  })
}
// 告警处理分析二级
export function warnProcessAnalysisByTenantId (params) {
  return $http.request({
    url: '/warnings/warning/warnProcessAnalysisByTenantId',
    params
  })
}
// 告警频次分析
export function warnFrequencyAnalysis (params) {
  return $http.request({
    url: '/warnings/warning/warnFrequencyAnalysis',
    params
  })
}
// 总数
export function warnProcessAnalysisTotal (params) {
  return $http.request({
    url: '/warnings/warning/warnProcessAnalysisTotal',
    params
  })
}
